<?php if (!isset($_SESSION)) session_start(); ?>

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../docs-assets/ico/favicon.png">

<title>Koreanet</title>

<!-- Nanum Webfont -->
<style>
* {
	font-family: 'NanumGothic' !important;
}
</style>
<script src="http://www.google.com/jsapi"></script>
<script>
 google.load( "webfont", "1" );
 google.setOnLoadCallback(function() {
  WebFont.load({ custom: {
   families: [ "NanumGothic" ],
   urls: [ "http://fontface.kr/NanumGothic/css" ]
  }});
 });
</script>

<!-- Bootstrap core CSS -->
<link href="./dist/css/bootstrap.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="./css/employee_detail.css" rel="stylesheet">
<link rel="stylesheet"
	href="./lib/datetimepicker/bootstrap-datetimepicker.min.css" />
</head>

<body>
<?php include 'header.php';?>
<?php require_once './class/Employee.inc';?>
<?php require_once './class/Category.inc';?>

	<div class="container container_bottom">
	<?php
	$getPageType = $_GET ['pageType'];
	$getId = $_GET ['id'];
	
	if ($getPageType == 1) {
		if ($login == null || $login->getGrade () > 2) {
			echo "<script type='text/javascript'>";
			echo "location.replace('./main.php');";
			echo "</script>";
			exit ();
		}
	}
	
	if ($getPageType != null) {
		switch ($getPageType) {
			case 1 : // 1:인력생성
				echo "<form method='post' action='./ajax/create_employee_data.php'>";
				break;
			case 2 : // 2:인력조회
			case 3 : // 3:내정보
				echo "<form method='post' action='./ajax/modify_employee_data.php'>";
				break;
		}
	}
	?>
		<div class="row row_margin">
			<div class="col-md-12">
			<?php
			if ($getPageType != null) {
				switch ($getPageType) {
					case 1 : // 1:인력생성
						echo "<h2>인력 생성</h2>";
						break;
					case 2 : // 2:인력조회
					default :
						echo "<h2>인력 상세</h2>";
						break;
					case 3 : // 3:내정보
						echo "<h2>내 정보</h2>";
						break;
				}
			}
			if ($getPageType != 1) {
				$employee = new Employee ();
				$employee->search4Detail ( $getId );
			}
			?>
			</div>
		</div>
		<div class="row row_margin">
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">사원번호</span>
					<?php
					echo "<input name='mem_id' type='text' class='form-control' placeholder='사원번호은 자동생성 됩니다.' readonly='readonly'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
						case 3 : // 3:내정보
							echo " value='" . $employee->mem_id . "'>";
							break;
					}
					echo "";
					?>
				</div>
			</div>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">회원등급</span>
			<?php
			echo "<select id='mem_grade' name='mem_grade' class='form-control' onchange='javascript:changeDelemiter(this)'";
			switch ($getPageType) {
				case 1 : // 1:인력생성
				case 2 : // 2:인력조회
					echo ">";
					break;
				case 3 : // 3:내정보
					echo " disabled='disabled'>";
					break;
			}
			if ($employee != null && ! empty ( $employee )) {
				switch ($employee->mem_grade) {
					case 2 : // 1:인력생성
						echo "<option value='2' selected='selected'>관리자</option><option value='3'>업체</option><option value='4'>기사</option>";
						break;
					case 3 : // 2:인력조회
						echo "<option value='2'>관리자</option><option value='3' selected='selected'>업체</option><option value='4'>기사</option>";
						break;
					case 4 : // 3:내정보
						echo "<option value='2'>관리자</option><option value='3'>업체</option><option value='4' selected='selected'>기사</option>";
						break;
				}
			} else {
				echo "<option value='2' selected='selected'>관리자</option><option value='3'>업체</option><option value='4'>기사</option>";
			}
			?>
					</select>
				</div>
			</div>
		</div>
		<div class="row row_margin">
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">성명</span>
					<?php
					echo "<input required id='mem_nm' name='mem_nm' type='text' class='form-control' placeholder='ex> 홍길동'";
					echo " maxlength='10'";
					echo " onkeyup='javascript:checkEnHan(this)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->mem_nm . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->mem_nm . "' readonly='readonly'>";
							break;
					}
					?>
				</div>
			</div>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">비밀번호</span>
					<?php
					echo "<input required id='passwd' name='passwd' type='text' class='form-control' placeholder='ex> abc123'";
					echo " maxlength='10'";
					echo " onkeyup='javascript:checkEnNum(this)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
						case 3 : // 3:내정보
							echo " value='" . $employee->passwd . "'>";
							break;
					}
					?>
				</div>
			</div>
		</div>
		<div class="row row_margin">
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">이메일</span>
					<?php
					echo "<input id='email' name='email' type='text'class='form-control' placeholder='ex> hong@korea-net.kr'";
					echo " maxlength='25'";
					echo " onkeyup='javascript:checkEmail(this)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->email . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->email . "'  readonly='readonly'>";
							break;
					}
					?>
				</div>
			</div>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">연락처</span>
					<?php
					echo "<input  id='phone_number' name='phone_number' type='text'class='form-control' placeholder='ex> 01012341234'";
					echo " maxlength='12'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
						case 3 : // 3:내정보
							echo " value='" . $employee->phone_number . "'>";
							break;
					}
					?>
				</div>
			</div>
		</div>
		<div class="row row_margin" id='req_member1'
			<?php
			if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
				echo "style='display:none;'";
			}
			?>>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">주민등록번호</span>
					<?php
					echo "<input id='cusno' name='cusno' type='text' class='form-control' placeholder='ex> 1401011234567'";
					echo " maxlength='13'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->cusno . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->cusno . "' readonly='readonly'>";
							break;
					}
					?>
				</div>
			</div>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">주소</span>
					<?php
					echo "<input id='address' name='address' type='text'class='form-control' placeholder='ex> 서울시 송파구 문정동 111-111'";
					echo " maxlength='50'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->address . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->address . "'  readonly='readonly'>";
							break;
					}
					?>
				</div>
			</div>
		</div>
		<div class="row row_margin" id='req_member2'
			<?php
			if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
				echo "style='display:none;'";
			}
			?>>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">거래은행</span>
					<?php
					echo "<input id='bank_nm' name='bank_nm' type='text' class='form-control' placeholder='ex> 우리은행'";
					echo " maxlength='7'";
					echo " onkeyup='javascript:checkEnHan(this)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->bank_nm . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->bank_nm . "'  readonly='readonly'>";
							break;
					}
					?>
				</div>
			</div>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">예금주</span>
					<?php
					echo "<input id='act_nm' name='act_nm' type='text' class='form-control' placeholder='ex> 홍길동'";
					echo " maxlength='15'";
					echo " onkeyup='javascript:checkEnHan(this)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->act_nm . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->act_nm . "'  readonly='readonly'>";
							break;
					}
					?>
				</div>
			</div>
		</div>
		<div class="row row_margin" id='req_member3'
			<?php
			if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
				echo "style='display:none;'";
			}
			?>>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">계좌번호</span>
					<?php
					echo "<input id='actno' name='actno' type='text'class='form-control' placeholder='ex> 12312345612123'";
					echo " maxlength='30'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->actno . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->actno . "'  readonly='readonly'>";
							break;
					}
					?>
				</div>
			</div>
			<div class="col-md-6">
				<div class="input-group">
					<span class="input-group-addon">기사 구분</span>
					<?php
					echo "<select id='car_soyu_tp' name='car_soyu_tp' class='form-control' onchange='javascript:changeSmallDelemiter(this)'>";
					if ($getPageType == 3) {
						echo " disabled='true'";
					}
					echo ">";
					// switch ($getPageType) {
					// case 1 : // 1:차량생성
					// echo ">";
					// break;
					// case 2 : // 2:차량조회
					// echo " disabled='disabled'>";
					// break;
					// }
					$category = new Category ();
					$category->search4table ( '7', $employee->car_soyu_tp );
					?>
						</select>
				</div>
			</div>
		</div>
		<div class="row row_margin" id='req_member11'
			<?php
			if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
				echo "style='display:none;'";
			}
			?>>
			<div class="col-md-6">
					<?php
					if ($getPageType == 3) {
						echo "<div class='input-group date'>";
					} else {
						echo "<div class='input-group date' id='picker3'>";
					}
					?>
				<span class="input-group-addon">입사일</span>
					<?php
					echo "<input id='enter_dt' name='enter_dt' type='text' class='form-control' placeholder='달력 버튼을 누르세요.' data-format='YYYY/MM/DD' readonly='readonly'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo "/>";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->enter_dt . "' />";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->enter_dt . "' />";
							break;
					}
					
					echo "<span class='input-group-addon input-group-addon-end add-last'>";
					echo "<button class='btn btn-default btn-calendar'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
						case 2 : // 2:인력조회
							echo ">달력</button></span>";
							break;
						case 3 : // 3:내정보
							echo " disabled='disabled'>달력</button></span>";
							break;
					}
					?>
				</div>
		</div>
		<div class="col-md-6">
					<?php
					if ($getPageType == 3) {
						echo "<div class='input-group date'>";
					} else {
						echo "<div class='input-group date' id='picker4'>";
					}
					?>
				<span class="input-group-addon">퇴사일</span>
					<?php
					echo "<input id='retire_dt' name='retire_dt' type='text' class='form-control' placeholder='달력 버튼을 누르세요.' data-format='YYYY/MM/DD' readonly='readonly'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo "/>";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->retire_dt . "' />";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->retire_dt . "' />";
							break;
					}
					
					echo "<span class='input-group-addon input-group-addon-end add-last'>";
					echo "<button class='btn btn-default btn-calendar'";
					switch ($getPageType) {
						case 2 : // 2:인력조회
							echo ">달력</button></span>";
							break;
						case 1 : // 1:인력생성
						case 3 : // 3:내정보
							echo " disabled='disabled'>달력</button></span>";
							break;
					}
					?>
				</div>
	</div>
	</div>
	<div class="row row_margin" id='req_member10'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
					<?php
					if ($getPageType == 3) {
						echo "<div class='input-group date'>";
					} else {
						echo "<div class='input-group date' id='picker1'>";
					}
					?>
					<span class="input-group-addon">사업자개업일</span>
					<?php
					echo "<input id='seo_open_dt' name='seo_open_dt' type='text' class='form-control' placeholder='달력 버튼을 누르세요.' data-format='YYYY/MM/DD' readonly='readonly'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo "/>";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->seo_open_dt . "' />";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->seo_open_dt . "' />";
							break;
					}
					
					echo "<span class='input-group-addon input-group-addon-end add-last'>";
					echo "<button class='btn btn-default btn-calendar'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
						case 2 : // 2:인력조회
							echo ">달력</button></span>";
							break;
						case 3 : // 3:내정보
							echo " disabled='disabled'>달력</button></span>";
							break;
					}
					?>
					</div>
	</div>
	<div class="col-md-6">
					<?php
					if ($getPageType == 3) {
						echo "<div class='input-group date'>";
					} else {
						echo "<div class='input-group date' id='picker2'>";
					}
					?>
				<span class="input-group-addon">입사보고일</span>
					<?php
					echo "<input id='in_bogo' name='in_bogo' type='text' class='form-control' placeholder='달력 버튼을 누르세요.' data-format='YYYY/MM/DD' readonly='readonly'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo "/>";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->in_bogo . "' />";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->in_bogo . "' />";
							break;
					}
					
					echo "<span class='input-group-addon input-group-addon-end add-last'>";
					echo "<button class='btn btn-default btn-calendar'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
						case 2 : // 2:인력조회
							echo ">달력</button></span>";
							break;
						case 3 : // 3:내정보
							echo " disabled='disabled'>달력</button></span>";
							break;
					}
					?>
					</div>
	</div>
	</div>
	<div class="row row_margin" id='req_member12'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6" id="col-sply_dt">
					<?php
					if ($getPageType == 3) {
						echo "<div class='input-group date'>";
					} else {
						echo "<div class='input-group date' id='picker5'>";
					}
					?>
				<span class="input-group-addon">운송료결산일</span>
					<?php
					echo "<input id='sply_dt' name='sply_dt' type='text' class='form-control' placeholder='달력 버튼을 누르세요.' data-format='YYYY/MM/DD' readonly='readonly'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo "/>";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->sply_dt . "' />";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->sply_dt . "' />";
							break;
					}
					
					echo "<span class='input-group-addon input-group-addon-end add-last'>";
					echo "<button class='btn btn-default btn-calendar'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
						case 2 : // 2:인력조회
							echo ">달력</button></span>";
							break;
						case 3 : // 3:내정보
							echo " disabled='disabled'>달력</button></span>";
							break;
					}
					?>
				</div>
	</div>
	<div class="col-md-6" id="col-family-num"
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="input-group">
			<span class="input-group-addon">피부양인 수</span>
					<?php
					echo "<input id='family-num' name='dependent_count' type='text' class='form-control' placeholder='ex> 기사님을 포함하여 입력하세요.'";
					echo " maxlength='13'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->dependent_count . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->dependent_count . "' readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">명</span>
		</div>
	</div>
	</div>

	<div class="row row_margin" id='req_member13'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">거래처</span> 
					<?php
					echo "<select name='cusm_cd' class='form-control'>";
					if ($getPageType == 3) {
						echo " disabled='true'";
					}
					echo ">";
					// switch ($getPageType) {
					// case 1 : // 1:차량생성
					// echo ">";
					// break;
					// case 2 : // 2:차량조회
					// echo " disabled='disabled'>";
					// break;
					// }
					$category = new Category ();
					$category->search4table ( '4', $employee->cusm_cd );
					?>
						</select>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">근무점포</span> 
					<?php
					echo "<select name='brno' class='form-control'>";
					if ($getPageType == 3) {
						echo " disabled='true'";
					}
					echo ">";
					// switch ($getPageType) {
					// case 1 : // 1:차량생성
					// echo ">";
					// break;
					// case 2 : // 2:차량조회
					// echo " disabled='disabled'>";
					// break;
					// }
					$category = new Category ();
					$category->search4table ( '3', $employee->brno );
					?>
						</select>
			</div>
		</div>
	</div>

	<div class="row row_margin" id='req_member14'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">관리비</span>
					<?php
					echo "<input  type='text' id='mng_amt' name='mng_amt' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->mng_amt . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->mng_amt . "' readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group" id='org_amt_div'>
				<span class="input-group-addon">환경개선/협회비</span>
					<?php
					echo "<input  type='text' id='org_amt' name='org_amt' class='form-control' placeholder='ex> 15000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->org_amt . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->org_amt . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>

	<div class="row row_margin" id='req_member15'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group" id='gps_amt_div'>
				<span class="input-group-addon">GPS</span>
					<?php
					echo "<input  type='text' id='gps_amt' name='gps_amt' class='form-control' placeholder='ex> 10000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->gps_amt . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->gps_amt . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">GPS ID</span>
					<?php
					echo "<input id='gps_id' name='gps_id' type='text'class='form-control' placeholder='ex> AS299GAW202'";
					echo " maxlength='50'";
					echo " onkeyup='javascript:checkEnNum(this)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->gps_id . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->gps_id . "'  readonly='readonly'>";
							break;
					}
					?>
				</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member4'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">사업자등록번호</span>
					<?php
					echo "<input id='seo_no' name='seo_no' type='text' class='form-control' placeholder='ex> 1231234112'";
					echo " maxlength='10'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->seo_no . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->seo_no . "' readonly='readonly'>";
							break;
					}
					?>
				</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">운전면허번호</span>
					<?php
					echo "<input id='ds_number' name='ds_number' type='text' class='form-control' placeholder='ex> 서울1212345612'";
					echo " maxlength='13'";
					echo " onkeyup='javascript:checkHanNum(this)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->ds_number . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->ds_number . "' readonly='readonly'>";
							break;
					}
					?>
				</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member5'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">화물자격번호</span>
					<?php
					echo "<input id='truck_id' name='truck_id' type='text' class='form-control' placeholder='ex> 11212345'";
					echo " maxlength='13'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->truck_id . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->truck_id . "' readonly='readonly'>";
							break;
					}
					?>
				</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<!-- TODO: DB 테이블에서 가져온 데이터로 옵션 제공할 것 -->
				<span class="input-group-addon">차량</span> 
				<?php
				echo "<select id='car_id' name='car_id' class='form-control'";
				switch ($getPageType) {
					case 1 : // 1:인력생성
						echo ">";
						break;
					case 2 : // 2:인력조회
						echo ">";
						echo "<option value=''>차량할당 없음</option>";
						break;
					case 3 : // 3:내정보
						echo " disabled='disabled'>";
						echo "<option value=''>차량할당 없음</option>";
						break;
				}
				$category = new Category ();
				$category->search4table ( '5', $employee->car_id );
				?>
				</select>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member6'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">기본 운송료</span>
					<?php
					echo "<input id='fare_amt' name='fare_amt' type='text'class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this,true)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->fare_amt . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->fare_amt . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">직책</span>
				<?php
				echo "<select id='position' name='position' class='form-control'";
				switch ($getPageType) {
					case 1 : // 1:인력생성
					case 2 : // 2:인력조회
						echo ">";
						break;
					case 3 : // 3:내정보
						echo " disabled='disabled'>";
						break;
				}
				$category = new Category ();
				$category->search4table ( '1', $employee->position );
				?>
				</select>
			</div>
		</div>
	</div>
	<!-- 		<div class="row row_margin" id='req_member7' -->
			<?php
			// if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			// echo "style='display:none;'";
			// }
			?>
<!-- 			><div class="col-md-6"> -->
	<!-- 				<div class="input-group"> -->
	<!-- 					<span class="input-group-addon">보험료</span> -->
					<?php
					// echo "<input id='insu_amt' name='insu_amt' type='text'class='form-control' placeholder='ex> 1000000 (금액만 숫자로 입력하세요.)'";
					// switch ($getPageType) {
					// case 1 : // 1:인력생성
					// echo ">";
					// break;
					// case 2 : // 2:인력조회
					// echo " value='" . $employee->insu_amt . "'>";
					// break;
					// case 3 : // 3:내정보
					// echo " value='" . $employee->insu_amt . "' readonly='readonly'>";
					// break;
					// }
					//					?>
<!-- 					<span class="input-group-addon add-last">원</span> -->
	<!-- 				</div> -->
	<!-- 			</div> -->
	<!-- 			<div class="col-md-6"> -->
	<!-- 				<div class="input-group"> -->
	<!-- 					<span class="input-group-addon">보험납입횟수</span> -->
					<?php
					// echo "<input id='insu_deg' name='insu_deg' type='text'class='form-control' placeholder='ex> 12 (횟수만 숫자로 입력하세요.)'";
					// switch ($getPageType) {
					// case 1 : // 1:인력생성
					// echo ">";
					// break;
					// case 2 : // 2:인력조회
					// echo " value='" . $employee->insu_deg . "'>";
					// break;
					// case 3 : // 3:내정보
					// echo " value='" . $employee->insu_deg . "' readonly='readonly'>";
					// break;
					// }
					//					?>
<!-- 					 <span class="input-group-addon add-last">회</span> -->
	<!-- 				</div> -->
	<!-- 			</div> -->
	<!-- 		</div> -->
	<div class="row row_margin" id='req_member8'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">차량 할부개월</span>
					<?php
					echo "<input id='instl_fee' name='instl_fee' type='text'class='form-control' placeholder='ex> 12'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->instl_fee . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->instl_fee . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">개월</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">차량할부회차</span>
					<?php
					echo "<input id='instl_deg' name='instl_deg' type='text'class='form-control' placeholder='ex> 3'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->instl_deg . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->instl_deg . "'  readonly='readonly'>";
							break;
					}
					?>
		</div>
	</div>
	</div>
	<div class="row row_margin" id='req_member9'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->mem_grade == 2 || $employee->mem_grade == 3))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">출퇴근거리</span>
					<?php
					echo "<input id='comm_dist' name='comm_dist' type='text'class='form-control' placeholder='ex> 20'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->comm_dist . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->comm_dist . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">Km </span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">출퇴근시간</span>
					<?php
					echo "<input id='comm_time' name='comm_time' type='text'class='form-control' placeholder='ex> 120'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this,false)'";
					switch ($getPageType) {
						case 1 : // 1:인력생성
							echo ">";
							break;
						case 2 : // 2:인력조회
							echo " value='" . $employee->comm_time . "'>";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->comm_time . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">분 </span>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member16'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">시급</span>
					<?php
					echo "<input  type='text' id='time_wages' name='time_wages' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->time_wages . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->time_wages . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">기본급</span>
					<?php
					echo "<input  type='text' id='base_pay' name='base_pay' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->base_pay . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->base_pay . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member17'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">연장수당</span>
					<?php
					echo "<input  type='text' id='extension_pay' name='extension_pay' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->extension_pay . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->extension_pay . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">연차수당</span>
					<?php
					echo "<input  type='text' id='annual_pay' name='annual_pay' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->annual_pay . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->annual_pay . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member18'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">EARLY SLOT</span>
					<?php
					echo "<input  type='text' id='early_slot' name='early_slot' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->early_slot . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->early_slot . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">교통비</span>
					<?php
					echo "<input  type='text' id='commit_pay' name='commit_pay' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->commit_pay . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->commit_pay . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member19'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">식대비</span>
					<?php
					echo "<input  type='text' id='meal_pay' name='meal_pay' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->meal_pay . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->meal_pay . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">국민연금</span>
					<?php
					echo "<input  type='text' id='pension_fee' name='pension_fee' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->pension_fee . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->pension_fee . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member20'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">건강보험</span>
					<?php
					echo "<input  type='text' id='insurance_fee' name='insurance_fee' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->insurance_fee . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->insurance_fee . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">장기요양</span>
					<?php
					echo "<input  type='text' id='recuperation_fee' name='recuperation_fee' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->recuperation_fee . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->recuperation_fee . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member21'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">고용보험</span>
					<?php
					echo "<input  type='text' id='unemploy_insurance_fee' name='unemploy_insurance_fee' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->unemploy_insurance_fee . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->unemploy_insurance_fee . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">갑근세</span>
					<?php
					echo "<input  type='text' id='income_tax' name='income_tax' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->income_tax . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->income_tax . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>
	<div class="row row_margin" id='req_member22'
		<?php
		if ($getPageType == 1 || ($getPageType != 1 && ($employee->car_soyu_tp != 7))) {
			echo "style='display:none;'";
		}
		?>>
		<div class="col-md-6">
			<div class="input-group">
				<span class="input-group-addon">주민세</span>
					<?php
					echo "<input  type='text' id='city_tax' name='city_tax' class='form-control' placeholder='ex> 100000'";
					echo " maxlength='20'";
					echo " onkeyup='javascript:checkNumber(this, true)'";
					switch ($getPageType) {
						case 1 : // 1:차량생성
							echo ">";
							break;
						case 2 : // 2:차량조회
							echo " value='" . $employee->city_tax . "' >";
							break;
						case 3 : // 3:내정보
							echo " value='" . $employee->city_tax . "'  readonly='readonly'>";
							break;
					}
					?>
					<span class="input-group-addon add-last">원</span>
			</div>
		</div>
	</div>

	<div class="row row_margin">
		<div class="col-md-12 text-right">
			<?php
			switch ($getPageType) {
				case 1 : // 1:인력생성
					echo "<button class='btn btn-lg btn-default' type='button'
						onclick='javascript:initData()'>입력 초기화</button>";
					break;
			}
			?>
			<?php
			echo "<button class='btn btn-lg btn-success' type='submit'";
			switch ($getPageType) {
				case 1 : // 1:인력생성
					echo ">생성</button>";
					break;
				case 2 : // 2:인력조회
				case 3 : // 3:내정보
					echo "onclick='releaseDisabled()'>저장</button>";
					break;
			}
			?>
			<button class="btn btn-lg btn-danger" type="button"
				onclick="window.history.back();">취소</button>
		</div>
	</div>
	</form>
	</div>
	<!-- /container -->

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
	<script src="./dist/js/bootstrap.js"></script>
	<script type="text/javascript" src="./lib/moment/moment.js"></script>
	<script type="text/javascript" src="./lib/moment/transition.js"></script>
	<script type="text/javascript" src="./lib/moment/collapse.js"></script>
	<script type="text/javascript"
		src="./lib/datetimepicker/bootstrap-datetimepicker.min.js"></script>

	<script type="text/javascript">
	$(window).load(function () {
		$('#picker1').datetimepicker({
			pickTime: false
		});
		$('#picker2').datetimepicker({
			pickTime: false
		});
		$('#picker3').datetimepicker({
			pickTime: false
		});
		<?php
		if ($getPageType != 1) {
			echo "$('#picker4').datetimepicker({ pickTime: false });";
		}
		?>
		$('#picker5').datetimepicker({
			pickTime: false
		});
		
		checkNumber(document.getElementById("fare_amt"), true);
		checkNumber(document.getElementById("time_wages"), true);
		checkNumber(document.getElementById("base_pay"), true);
		checkNumber(document.getElementById("extension_pay"), true);
		checkNumber(document.getElementById("annual_pay"), true);
		checkNumber(document.getElementById("early_slot"), true);
		checkNumber(document.getElementById("commit_pay"), true);
		checkNumber(document.getElementById("meal_pay"), true);
		checkNumber(document.getElementById("pension_fee"), true);
		checkNumber(document.getElementById("insurance_fee"), true);
		checkNumber(document.getElementById("recuperation_fee"), true);
		checkNumber(document.getElementById("unemploy_insurance_fee"), true);
		checkNumber(document.getElementById("income_tax"), true);
		checkNumber(document.getElementById("city_tax"), true);
		checkNumber(document.getElementById("mng_amt"), true);
		checkNumber(document.getElementById("org_amt"), true);
		checkNumber(document.getElementById("gps_amt"), true);
		
		changeDelemiter(document.getElementById("mem_grade"));
	});

	function releaseDisabled() {
		$("#mem_grade").removeAttr("disabled");
		$("#position").removeAttr("disabled");
		$("#car_id").removeAttr("disabled");
	}
		
	function changeDelemiter(obj) {
		if (obj.value == "2" || obj.value == "3") {
			document.getElementById("req_member1").style.display = "none";
			document.getElementById("req_member2").style.display = "none";
			document.getElementById("req_member3").style.display = "none";
			document.getElementById("req_member4").style.display = "none";
			document.getElementById("req_member5").style.display = "none";
			document.getElementById("req_member6").style.display = "none";
// 			document.getElementById("req_member7").style.display = "none";
			document.getElementById("req_member8").style.display = "none";
			document.getElementById("req_member9").style.display = "none";
			document.getElementById("req_member10").style.display = "none";
			document.getElementById("req_member11").style.display = "none";
			document.getElementById("req_member12").style.display = "none";
			document.getElementById("req_member13").style.display = "none";
			document.getElementById("req_member14").style.display = "none";
			document.getElementById("req_member15").style.display = "none";

			document.getElementById("col-sply_dt").style.display = "none";
			document.getElementById("col-family-num").style.display = "none";
			document.getElementById("req_member16").style.display = "none";
			document.getElementById("req_member17").style.display = "none";
			document.getElementById("req_member18").style.display = "none";
			document.getElementById("req_member19").style.display = "none";
			document.getElementById("req_member20").style.display = "none";
			document.getElementById("req_member21").style.display = "none";
			document.getElementById("req_member22").style.display = "none";
		} else if (obj.value == "4") {
			document.getElementById("req_member1").style.display = "inherit";
			document.getElementById("req_member2").style.display = "inherit";
			document.getElementById("req_member3").style.display = "inherit";
			document.getElementById("req_member4").style.display = "inherit";
			document.getElementById("req_member5").style.display = "inherit";
			document.getElementById("req_member6").style.display = "inherit";
// 			document.getElementById("req_member7").style.display = "inherit";
			document.getElementById("req_member8").style.display = "inherit";
			document.getElementById("req_member9").style.display = "inherit";
			document.getElementById("req_member10").style.display = "inherit";
			document.getElementById("req_member11").style.display = "inherit";
			document.getElementById("req_member12").style.display = "inherit";
			document.getElementById("req_member13").style.display = "inherit";
			document.getElementById("req_member14").style.display = "inherit";
			document.getElementById("req_member15").style.display = "inherit";

			changeSmallDelemiter(document.getElementById("car_soyu_tp"));
		}
	}

	function changeSmallDelemiter(obj) {
		if (obj.value == "7") {
			document.getElementById("req_member10").style.display = "none";
			document.getElementById("req_member14").style.display = "none";
			document.getElementById("req_member15").style.display = "none";
			document.getElementById("req_member4").style.display = "none";
			document.getElementById("req_member5").style.display = "none";
			document.getElementById("req_member6").style.display = "none";
			document.getElementById("req_member8").style.display = "none";
			document.getElementById("req_member9").style.display = "none";
			document.getElementById("col-sply_dt").style.display = "inherit";
			document.getElementById("col-family-num").style.display = "inherit";
			document.getElementById("req_member16").style.display = "inherit";
			document.getElementById("req_member17").style.display = "inherit";
			document.getElementById("req_member18").style.display = "inherit";
			document.getElementById("req_member19").style.display = "inherit";
			document.getElementById("req_member20").style.display = "inherit";
			document.getElementById("req_member21").style.display = "inherit";
			document.getElementById("req_member22").style.display = "inherit";
		} else {
			document.getElementById("req_member10").style.display = "inherit";
			document.getElementById("req_member14").style.display = "inherit";
			document.getElementById("req_member15").style.display = "inherit";
			document.getElementById("req_member4").style.display = "inherit";
			document.getElementById("req_member5").style.display = "inherit";
			document.getElementById("req_member6").style.display = "inherit";
			document.getElementById("req_member8").style.display = "inherit";
			document.getElementById("req_member9").style.display = "inherit";
			document.getElementById("col-sply_dt").style.display = "inherit";
			document.getElementById("col-family-num").style.display = "none";
			document.getElementById("req_member16").style.display = "none";
			document.getElementById("req_member17").style.display = "none";
			document.getElementById("req_member18").style.display = "none";
			document.getElementById("req_member19").style.display = "none";
			document.getElementById("req_member20").style.display = "none";
			document.getElementById("req_member21").style.display = "none";
			document.getElementById("req_member22").style.display = "none";
		}
	}

	$(document).ready(function () {
		$('#mem_nm').tooltip({'trigger':'focus', 'title': '최대 10자 이내 한글 또는 영문으로 입력하세요.'});
		$('#passwd').tooltip({'trigger':'focus', 'title': '최대 10자 이내 영문 또는 숫자를 조합하여 입력하세요.'});
		$('#email').tooltip({'trigger':'focus', 'title': '최대 25자 이내 영문 또는 숫자를 조합하여 이메일 형식에 맞게 입력하세요.'});
		$('#phone_number').tooltip({'trigger':'focus', 'title': '최대 12자 이내 숫자만 입력하세요.'});
		$('#cusno').tooltip({'trigger':'focus', 'title': '최대 13자 이내 숫자만 입력하세요.'});
		$('#address').tooltip({'trigger':'focus', 'title': '최대 50자 이내에서 자유롭게 입력하세요.'});
		$('#bank_nm').tooltip({'trigger':'focus', 'title': '최대7자 이내 한글 또는 영문을 조합하여 입력하세요.'});
		$('#act_nm').tooltip({'trigger':'focus', 'title': '최대 15자 이내 한글 또는 영문을 조합하여 입력하세요.'});
		$('#actno').tooltip({'trigger':'focus', 'title': '최대 30자 이내 숫자만 입력하세요.'});
		$('#seo_no').tooltip({'trigger':'focus', 'title': '최대 10자 이내 숫자만 입력하세요.'});
		$('#ds_number').tooltip({'trigger':'focus', 'title': '최대 13자 이내 한글 또는 숫자를 조합하여 입력하세요.'});
		$('#truck_id').tooltip({'trigger':'focus', 'title': '최대 13자 이내 숫자만 입력하세요.'});
		$('#fare_amt').tooltip({'trigger':'focus', 'title': '최대 20자 이내 숫자만 입력하세요.'});
		$('#gps_id').tooltip({'trigger':'focus', 'title': '최대 50자 이내 영문 또는 숫자를 조합하여 입력하세요.'});
		$('#instl_fee').tooltip({'trigger':'focus', 'title': '최대 20자 이내 숫자만 입력하세요.'});
		$('#instl_deg').tooltip({'trigger':'focus', 'title': '최대 20자 이내 숫자만 입력하세요.'});
		$('#comm_dist').tooltip({'trigger':'focus', 'title': '최대 20자 이내 숫자만 입력하세요.'});
		$('#comm_time').tooltip({'trigger':'focus', 'title': '최대 20자 이내 숫자만 입력하세요.'});
	});

	function checkNumber(obj, isWon)
	{
		if (obj.value.length > 0)
		{
			for (var i = 0; i < obj.value.length; i++)
			{
				if (!(isWon && obj.value.charAt(i) == ',') && (obj.value.charAt(i) < '0' || obj.value.charAt(i) > '9')) {
					obj.value = obj.value.substr(0,i);
				}
			}
			if (isWon) {
				obj.value = commaNum(obj.value);
			}
		}
	}

	function commaNum(num) {
		num = num.replace(/,/gi,'');
		var len, point, str;
		num = num + "";
		point = num.length % 3;
		len = num.length;

		str = num.substring(0, point);
		while (point < len) {
			if (str != "") str += ",";
			str += num.substring(point, point + 3);
			point += 3;
		}
		return str;
	}
	
	function checkEnNum(obj)
	{
		for( var i=0; i < obj.value.length;i++)
		{
			var c = obj.value.charCodeAt(i);
			if( !( (  65 <= c && c <= 90 ) || ( 97 <= c && c <= 122 ) ) && (obj.value.charAt(i) < '0' || obj.value.charAt(i) > '9')) {
				obj.value = obj.value.substr(0,i);
			}
		}
	}

	function checkHanNum(obj)
	{
		for( var i=0; i < obj.value.length;i++)
		{
			var c = obj.value.charCodeAt(i);
			if( !( ( 0xAC00 <= c && c <= 0xD7A3 ) || ( 0x3131 <= c && c <= 0x318E ) ) && (obj.value.charAt(i) < '0' || obj.value.charAt(i) > '9')) {
				obj.value = obj.value.substr(0,i);
			}
		}
	}
	
	function checkEnHan(obj)
	{
		for( var i=0; i < obj.value.length;i++)
		{
			var c = obj.value.charCodeAt(i);
			if( !( (  65 <= c && c <= 90 ) || ( 97 <= c && c <= 122 ) ) && !( ( 0xAC00 <= c && c <= 0xD7A3 ) || ( 0x3131 <= c && c <= 0x318E ) )) {
				obj.value = obj.value.substr(0,i);
			}
		}
	}

	function checkEmail(obj)
	{
		for( var i=0; i < obj.value.length;i++)
		{
			var c = obj.value.charCodeAt(i);
			if (i == 0) {
				if (!( (  65 <= c && c <= 90 ) || ( 97 <= c && c <= 122 ) )) {
					obj.value = obj.value.substr(0,i);
				}	
			} else {
				if( !( (  65 <= c && c <= 90 ) || ( 97 <= c && c <= 122 ) ) && (obj.value.charAt(i) < '0' || obj.value.charAt(i) > '9')) {
					if ( ! obj.value.charAt(i).match('@') && ! obj.value.charAt(i).match('.')) {
						obj.value = obj.value.substr(0,i);	
					}
				}
			}
		}
	}

	function initData() {
		document.getElementById("mem_nm").value = "";
		document.getElementById("passwd").value = "";
		document.getElementById("email").value = "";
		document.getElementById("phone_number").value = "";
		document.getElementById("cusno").value = "";
		document.getElementById("address").value = "";
		document.getElementById("bank_nm").value = "";
		document.getElementById("actno").value = "";
		document.getElementById("act_nm").value = "";
		document.getElementById("seo_no").value = "";
		document.getElementById("ds_number").value = "";
		document.getElementById("truck_id").value = "";
		document.getElementById("fare_amt").value = "";
		document.getElementById("gps_id").value = "";
		document.getElementById("instl_fee").value = "";
		document.getElementById("instl_deg").value = "";
		document.getElementById("comm_dist").value = "";
		document.getElementById("comm_time").value = "";
		document.getElementById("seo_open_dt").value = "";
		document.getElementById("in_bogo").value = "";
		document.getElementById("enter_dt").value = "";
		document.getElementById("sply_dt").value = "";
	}
	</script>
</body>
</html>